<?php

namespace App\Http\Middleware;

use Closure;
use function EasyWeChat\Kernel\Support\get_client_ip;

class Blacklist
{
    /**
     * 黑名单
     * @param $request
     * @param Closure $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
		$ip_arr = [

		];
		$client_ip = get_client_ip();

		if (in_array($client_ip, $ip_arr)){
			return response()->json(['code' => '1001','data' => [],'message' => '无权限访问']);
		}
        return $next($request);
    }
}
